package com.cxh.rmsq.ui.activity.self

import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.TextView
import com.cxh.rmsq.R
import com.cxh.rmsq.common.Constant
import com.cxh.rmsq.ui.activity.TitleBaseActivity
import com.cxh.rmsq.ui.activity.WebViewActivity

/**
 * 帮助与投诉
 */
class HelpComplaintActivity : TitleBaseActivity(), View.OnClickListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_help_complaint)
        titleBar.tvTitle.text = "帮助与投诉"
        findViewById<TextView>(R.id.tv_shensu).setOnClickListener(this)
        findViewById<TextView>(R.id.tv_fangpian).setOnClickListener(this)
        findViewById<TextView>(R.id.tv_guifan).setOnClickListener(this)
        findViewById<TextView>(R.id.tv_suggest).setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.tv_shensu -> {//账号申诉
                startActivity(Intent(this@HelpComplaintActivity, AccountCompaintActivity::class.java))
            }

            R.id.tv_fangpian -> {//防骗指南
                startActivity(Intent(this@HelpComplaintActivity, FpznActivity::class.java))
            }

            R.id.tv_guifan -> {//规范
                startActivity(
                    Intent(
                        this,
                        WebViewActivity::class.java
                    ).putExtra(WebViewActivity.PARAMS_URL, Constant.behaviorStandard)
                        .putExtra(WebViewActivity.PARAMS_TITLE, "行为规范")
                )
            }

            R.id.tv_suggest -> {//意见反馈
                startActivity(Intent(this@HelpComplaintActivity, SuggestActivity::class.java))
            }

        }
    }
}